#include <cstdio>

int n;
double p[ 21 ], ans;

void dfs( int q, int flag, double r )
{
    int i;
    if ( r >= 1e-8 )
        ans += 1 / ( r * flag );
    for ( i = q; i < n; i++ )
        dfs( i + 1, flag * ( -1 ), r + p[ i ] );
}

int main( )
{
    int i;
    while ( scanf("%d", &n) != EOF )
    {
        for ( i = 0; i < n; i++ )
            scanf("%lf", &p[ i ]);
        ans = 0;
        dfs( 0, -1, 0 );
        printf("%lf\n", ans);
    }
    return 0;
}
